package com.zz.inventory.config;

import io.github.yuanbaobaoo.dify.client.DifyClientBuilder;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class DifyConfig {
    @Value("${dify.ai.apikey}")
    private String apiKey;
    @Value("${dify.ai.baseUrl}")
    private String baseUrl;

    @Bean
    public DifyClientBuilder difyClient(){
        return DifyClientBuilder.create()
                .apiKey(apiKey)
                .baseUrl(baseUrl);
    }
}
